package com.kuangstudy.controller;

import com.kuangstudy.service.prize.DrowPrizeKCronService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author renyitong
 * @version 1.0.0
 * @createTime 2023年09月18日
 * @Description
 */
@RestController
@Api(tags = "用户【抽K币】")
public class DrowPrizeKCronController {

    @Autowired
    private DrowPrizeKCronService drowPrizeKCronService;


    @PostMapping("/user/drow/kcron")
    @ApiOperation("模拟用户抽取K币")
    public String userDrowKCron(@RequestParam("userId") Long userId){
        String kCorn = drowPrizeKCronService.drowKCorn(userId);
        return "用户【" + userId + "】抽取到的K币是: " + "【" + kCorn + "】";
    }

}
